package patterns.filter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lenovo on 2016/11/24 0024.
 * 具体标准实现类
 */
public class FilterWoman implements IFilter {
    @Override
    public List<Person> matchCriteria(List<Person> personList) {
        List<Person> womanList = new ArrayList<>();
        for (Person p : personList) {
            //性别为女性
            if (p.getGender().equalsIgnoreCase("woman")) {
                womanList.add(p);
            }
        }
        return womanList;
    }
}
